package com.fanfan.controller;


import com.fanfan.pojo.domain.ResponseResult;
import com.fanfan.service.TradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/tradeList")
public class TradeController {
    @Autowired
    TradeService tradeService;

    @GetMapping
    public ResponseResult tradeList(Integer pageNum, Integer pageSize){
        return  tradeService.tradeList(pageNum,pageSize);
    }
    @GetMapping("/{tradeId}")
    public ResponseResult getTradeDetail(@PathVariable Long tradeId){
        return tradeService.getTradeDetail(tradeId);
    }
}